import React, { FC, memo } from "react";
import { Provider } from 'react-redux';
import routes from './routes';
import { renderRoutes } from 'react-router-config';
import { HashRouter } from 'react-router-dom';
import store from './store';

const AppComponent: FC = (): JSX.Element => {
  return (
    <Provider store={store}>
      <main className="main">
        <HashRouter>
          {renderRoutes(routes)}
        </HashRouter>
      </main>
    </Provider>
  )
}

export default memo(AppComponent);
